﻿using System;
using System.Collections.Generic;
using System.Web.Mvc;
using Xenta.Utils;
using Xenta.Web.Controllers;

namespace Xenta.Web.Areas.Catalog.Controllers
{
    public sealed class TagController : ExtController
    {
        [ChildActionOnly]
        public ActionResult _Cloud()
        {
            var m = Svc.ProcessOperation("SearchCatalogTags", new
            {
                LanguageID = JDM.Int32(Svc.Localization.Language.EntityID),
                FlagMask = "Active"
            }, new
            {
                DisclosureLevel = "Base",
                DisclosureOptions = new Dictionary<String, String>
                {
                    { "TranslatedTo", JDM.String(Svc.Localization.Language.Code) }
                }.Unload()
            }).Items;
            return PartialView(m);
        }
    }
}
